import {
  createRouter,
  createWebHashHistory,
  createWebHistory,
} from "vue-router";
import OrderTiket from "@/views/order/CheckOrder.vue";
import Index from "@/views/index.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/index",
      name: "index",
      component: Index,
    },
    {
      path: "/order_ticket",
      name: "order_ticket",
      component: OrderTiket,//不进行懒加载
    },
    {
      path: "/order_ticket_by",
      name: "order_ticket_by",
      component: () => import("../views/order/CheckOrderBy.vue"),
    },
    {
      path: "/progress",
      name: "progress",
      component: () => import("../views/order/OrderProgress.vue"),
    },
    {
      path: "/confirm_pay_order",
      name: "confirmPayOrder",
      component: () => import("../views/order/ConfirmPayOrder.vue"),
    },
    {
      path: "/order_sucss",
      name: "OrderSuccess",
      component: () => import("../views/order/OrderSucess.vue"),
    },
    {
      path: "/pay_check",
      name: "PayCheck",
      component: () => import("../views/order/CheckPayment.vue"),
    },
    {
      path: "/",
      redirect: "/index",
    },
  ],
});

export default router;
